package com.ruicar.afs.cloud.common.mq.rabbit.anno.send;


import com.ruicar.afs.cloud.common.mq.rabbit.constant.AfsRabbitMqConstants;
import com.ruicar.afs.cloud.common.mq.rabbit.fallback.DefaultFallBack;
import com.ruicar.afs.cloud.common.mq.rabbit.fallback.SendFallBack;

import java.lang.annotation.*;

/**
 * The type AfsRabbitSender
 * <p>Description: </p>
 *
 * @author Fzero
 * @version 1.0
 * @date Created on 2020.06.11 16:32:18
 * @since 1.0
 */
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface AfsRabbitMqSender {
    /**
     * Server alias string
     * 服务器别名和配置中一致
     *
     * @return the string
     */
    String serverAlias();


    /**
     * Exchange name string
     * rabbit 交换器名称 默认用rabbit 的 amq.direct
     *
     * @return the string
     */
    String exchangeName() default AfsRabbitMqConstants.DEFAULT_EXCHANGE_NAME;

    /**
     * Queue name string
     * 要发送队列名
     *
     * @return the string
     */
    String queueName();

    /**
     * Fall back class
     *
     * @return the class
     */
    Class<? extends SendFallBack> fallBack() default DefaultFallBack.class;

    /**
     * Enable on string
     *
     * @return the string
     */
    String enableOn () default "";


    /**
     * Afs message boolean
     * 是否为 afs 平台内部发送消息，true-是，false-否
     * @return the boolean
     */
    boolean afsMessage() default true;
}
